package it.xiuxian.login.presenter

import com.lzy.okgo.OkGo
import it.xiuxian.lib.base.BaseBean
import it.xiuxian.lib.base.BasePresenter
import it.xiuxian.lib.base.ILoadBind
import it.xiuxian.lib.bean.ContentBean
import it.xiuxian.lib.http.CallBackOption
import it.xiuxian.lib.http.HttpConfig
import it.xiuxian.login.activity.UserAgreementActivity

class UserAgreementActivityPresenter:BasePresenter<UserAgreementActivity>() {
    fun aboutUs(){
        OkGo.post<BaseBean<ContentBean>>(HttpConfig.BASE_URL+"/apppeizhi/get")
            .execute(object : CallBackOption<BaseBean<ContentBean>>(){

            }.loadBind(mView as UserAgreementActivity).execute( object :
                ILoadBind<BaseBean<ContentBean>> {
                override fun excute(bean: BaseBean<ContentBean>) {
                    if (bean.code==0){
                        (mView as UserAgreementActivity).setUI(bean.data)
                    }
                }
            }))
    }
}
